package com.foo.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foo.wechat.mapper.WxCanteenMenuMapper;
import com.foo.wechat.domain.WxCanteenMenu;
import com.foo.wechat.service.IWxCanteenMenuService;
import com.foo.common.core.text.Convert;

/**
 * 餐厅菜单Service业务层处理
 * 
 * @author foo
 * @date 2025-11-11
 */
@Service
public class WxCanteenMenuServiceImpl implements IWxCanteenMenuService 
{
    @Autowired
    private WxCanteenMenuMapper wxCanteenMenuMapper;

    /**
     * 查询餐厅菜单
     * 
     * @param menuId 餐厅菜单ID
     * @return 餐厅菜单
     */
    @Override
    public WxCanteenMenu selectWxCanteenMenuById(Long menuId)
    {
        return wxCanteenMenuMapper.selectWxCanteenMenuById(menuId);
    }

    /**
     * 查询餐厅菜单列表
     * 
     * @param wxCanteenMenu 餐厅菜单
     * @return 餐厅菜单
     */
    @Override
    public List<WxCanteenMenu> selectWxCanteenMenuList(WxCanteenMenu wxCanteenMenu)
    {
        return wxCanteenMenuMapper.selectWxCanteenMenuList(wxCanteenMenu);
    }

    /**
     * 新增餐厅菜单
     * 
     * @param wxCanteenMenu 餐厅菜单
     * @return 结果
     */
    @Override
    public int insertWxCanteenMenu(WxCanteenMenu wxCanteenMenu)
    {
        return wxCanteenMenuMapper.insertWxCanteenMenu(wxCanteenMenu);
    }

    /**
     * 修改餐厅菜单
     * 
     * @param wxCanteenMenu 餐厅菜单
     * @return 结果
     */
    @Override
    public int updateWxCanteenMenu(WxCanteenMenu wxCanteenMenu)
    {
        return wxCanteenMenuMapper.updateWxCanteenMenu(wxCanteenMenu);
    }

    /**
     * 删除餐厅菜单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWxCanteenMenuByIds(String ids)
    {
        return wxCanteenMenuMapper.deleteWxCanteenMenuByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除餐厅菜单信息
     * 
     * @param menuId 餐厅菜单ID
     * @return 结果
     */
    @Override
    public int deleteWxCanteenMenuById(Long menuId)
    {
        return wxCanteenMenuMapper.deleteWxCanteenMenuById(menuId);
    }
}
